{% extends 'djangobb_forum/base.html' %}
{% load forum_extras %}
{% load i18n %}

{% block content %}
<div id="viewprofile" class="block">
	<h2><span>{% trans "Profile" %}</span></h2>
	<div class="box">
		<div class="fakeform">
			<div class="inform">
				<fieldset>
				<legend>{% trans "Personal" %}</legend>
					<div class="infldset">
						<dl>
							<dt>{% trans "Username:" %} </dt>
							<dd>{{ profile }}</dd>
							<dt>{% trans "Title" %} </dt>
							<dd>{{ profile.forum_profile.status }}</dd>
							<dt>{% trans "Real name:" %} </dt>
							{% if profile.first_name or profile.last_name %}
								<dd>{{ profile.first_name }} {{ profile.last_name }}</dd>
							{% else %}
								<dd>{% trans "(Unknown)" %}</dd>
							{% endif %}
							<dt>{% trans "Location" %} </dt>
							{% if profile.forum_profile.location %}
								<dd>{{ profile.forum_profile.location }}</dd>
							{% else %}
								<dd>{% trans "(Unknown)" %}</dd>
							{% endif %}
							<dt>{% trans "Website:" %} </dt>
							{% if profile.forum_profile.site %}
								<dd>{{ profile.forum_profile.site|urlize }}</dd>
							{% else %}
								<dd>{% trans "(Unknown)" %}</dd>
							{% endif %}
							<dt>{% trans "E-mail:" %} </dt>
							{% if profile.forum_profile.privacy_permission == 0 %}
								<dd><a href="mailto:{{ profile.email }}">{{ profile.email }}</a></dd>
							{% else %}
								{% if profile.forum_profile.privacy_permission == 1 %}
									<dd><a href="{% url djangobb:misc %}?mail_to={{ profile }}">{% trans "Send e-mail" %}</a></dd>
								{% else %}
									<dd>{% trans "(Hidden)" %}</dd>
								{% endif %}
							{% endif %}
						</dl>
						<div class="clearer"></div>
					</div>
				</fieldset>
			</div>
			<div class="inform">
				<fieldset>
				<legend>{% trans "Messaging" %}</legend>
					<div class="infldset">
						<dl>
							<dt>{% trans "Jabber:" %} </dt>
							{% if profile.forum_profile.jabber %}
								<dd>{{ profile.forum_profile.jabber }}</dd>
							{% else %}
								<dd>{% trans "(Unknown)" %}</dd>
							{% endif %}
							<dt>{% trans "ICQ:" %} </dt>
							{% if profile.forum_profile.icq %}
								<dd>{{ profile.forum_profile.icq }}</dd>
							{% else %}
								<dd>{% trans "(Unknown)" %}</dd>
							{% endif %}
							<dt>{% trans "MSN Messenger:" %} </dt>
							{% if profile.forum_profile.msn %}
								<dd>{{ profile.forum_profile.msn }}</dd>
							{% else %}
								<dd>{% trans "(Unknown)" %}</dd>
							{% endif %}
							<dt>{% trans "AOL IM:" %} </dt>
							{% if profile.forum_profile.aim %}
								<dd>{{ profile.forum_profile.aim }}</dd>
							{% else %}
								<dd>{% trans "(Unknown)" %}</dd>
							{% endif %}
							<dt>{% trans "Yahoo! Messenger:" %} </dt>
							{% if profile.forum_profile.yahoo %}
								<dd>{{ profile.forum_profile.yahoo }}</dd>
							{% else %}
								<dd>{% trans "(Unknown)" %}</dd>
							{% endif %}
						</dl>
						<div class="clearer"></div>
					</div>
				</fieldset>
			</div>
			<div class="inform">
				<fieldset>
				<legend>{% trans "Personality" %}</legend>
					<div class="infldset">
						<dl>
							<dt>{% trans "Avatar:" %} </dt>
							{% if profile.forum_profile.avatar %}
								<dd><img src="{{ profile.forum_profile.avatar.url }}" /></dd>
							{% else %}
								<dd>{% trans "(No avatar)" %}</dd>
							{% endif %}
							<dt>{% trans "Signature:" %} </dt>
							{% if profile.forum_profile.signature_html %}
								<dd>{{ profile.forum_profile.signature_html|safe }}</dd>
							{% else %}
								<dd>{% trans "(Unknown)" %}</dd>
							{% endif %}
						</dl>
						<div class="clearer"></div>
					</div>
				</fieldset>
			</div>
			<div class="inform">
				<fieldset>
				<legend>{% trans "User activity" %}</legend>
					<div class="infldset">
						<dl>
							<dt>{% trans "Posts:" %} </dt>
							<dd>{{ profile.forum_profile.post_count }} - <a href="{% url djangobb:search %}?action=show_user&amp;user_id={{ profile.id }}">{% trans "Show all posts" %}</a></dd>
							<dt>{% trans "Last post:" %} </dt>
							{% if profile.forum_profile.last_post %}
								<dd>{{ profile.forum_profile.last_post }}</dd>
							{% else %}
								<dd>{% trans "(Unknown)" %}</dd>
							{% endif %}
							<dt>{% trans "Registered:" %} </dt>
							<dd>{{ profile.date_joined|date:"Y-m-d" }}</dd>
						</dl>
						<div class="clearer"></div>
					</div>
				</fieldset>
			</div>
		</div>
	</div>
</div>
{% endblock %}
